home *** CD-ROM | disk | FTP | other *** search
- #import <objc/Object.h>
- #import <stdio.h>
-
- #define BUFSIZE 2048
-
- @interface Process:Object {
- FILE *fpTo, *fpFrom;
- int from;
- int childPid;
- int masterPty; // file descriptor for master/slave pty
- int slavePty;
- id delegate;
- int bufferCount;
- char buffer[BUFSIZE];
- SEL action;
- }
-
- + new:(char *)process delegate:del ;
- + new:(char *)process delegate:del andPty:(BOOL)wantsPty andStderr:(BOOL)wantsStderr;
- - init:(char *)process delegate:del; // init: andStdErr:YES
- - init:(char *)process delegate:del andPty:(BOOL)wantsPty andStderr:(BOOL)wantsStderr;
-
- - (char)getc;
- - puts:(char *)s;
- - gets:(char *)s :(int)n;
- - terminate:sender; // forces the process to terminate (w/ SIGTERM)
- - setDelegate:anObject;
- - delegate;
- - setAction:(SEL)theAction;
- @end
-